package com.own.compoent.util.zip.unzip.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * ZipFolderModel
 *
 * @author chenxueli
 * @date 2022-09-27 19:45:00
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class BaseZipFolderModel extends BaseZipModel implements Serializable {

    @Schema(title = "下一级")
    private List<BaseZipModel> children;

    @Schema(title = "下一级Map")
    @JsonIgnore
    private Map<String, BaseZipModel> folderMap = new HashMap<>();

    public BaseZipFolderModel(String name) {
        super(name);
        this.children = new ArrayList<>();
        this.folderMap = new HashMap<>();
    }

}
